requirejs.config({
  baseUrl: 'js',

  paths: {
    text: 'libs/text/text'
  },

  shim: {
    'libs/underscore': {
      exports: '_'
    },
    'libs/backbone': {
      deps: ['libs/underscore/underscore']
    , exports: 'Backbone'
    },
    'app': {
      deps: [
        'libs/underscore/underscore', 
        'libs/backbone/backbone', 
        'libs/foundation/vendor/custom.modernizr',
        'libs/foundation/foundation.min'
      ]
    }
  }
});

require([
  'app'
],

function(App) {
  window.app = new App();
  $(document).foundation();
});
